#!/bin/sh

set -e

THIS_PACKAGE=broffice.org-big
THIS_SCRIPT=postrm

LIBSUFFIX=li
PLATFORMID=linux_x86


DIVERSIONS="/usr/lib/openoffice/program/bootstraprc /usr/lib/openoffice/program/versionrc /usr/lib/openoffice/share/registry/modules/org/openoffice/Setup/Setup-brand.xcu /usr/share/applications/openoffice.org-calc.desktop /usr/share/applications/openoffice.org-writer.desktop /usr/share/applications/openoffice.org-draw.desktop /usr/share/applications/openoffice.org-base.desktop /usr/share/applications/openoffice.org-impress.desktop /usr/share/applications/openoffice.org-math.desktop /usr/share/applications/openoffice.org-extensionmgr.desktop /usr/share/applications/openoffice.org-startcenter.desktop /usr/share/application-registry/openoffice.applications /usr/share/mimelnk/application/vnd.openofficeorg.extension.desktop /usr/share/mime-info/openoffice.keys /usr/lib/openoffice/share/registry/modules/org/openoffice/Office/UI/UI-brand.xcu /usr/share/templates/soffice.odt.desktop /usr/share/templates/soffice.ods.desktop /usr/share/templates/soffice.odp.desktop /usr/share/templates/soffice.odg.desktop"
#DIVERSIONS="$DIVERSIONS /usr/lib/openoffice/program/intro.bmp /usr/lib/openoffice/program/about.bmp"
DIVERSIONS="$DIVERSIONS /usr/lib/openoffice/program/openintro_ubuntu_sun.bmp /usr/lib/openoffice/program/openabout_ubuntu_sun.bmp"

LANGPACKISOS="en-US"

if [ "$1" = "remove" -o "$1" = "abort-install" -o "$1" = "disappear" ]; then
	for i in $DIVERSIONS; do
		dpkg-divert --package $THIS_PACKAGE --remove --rename --divert $i.ooo $i
	done
        for i in $LANGPACKISOS; do
		dpkg-divert --package $THIS_PACKAGE --remove --rename --divert /usr/lib/openoffice/program/resource/ooo$i.res.ooo /usr/lib/openoffice/program/resource/ooo$i.res
	done
fi



